home *** CD-ROM | disk | FTP | other *** search
/ Risc World 3 / Risc World 3.iso / SOFTWARE / ISSUE3 / POWERBASE / DOCS / Supplement < prev   
Text File  |  2002-01-10  |  47KB  |  833 lines

  1. =============================
  2. Supplement v.8.27, 09-01-2002
  3. =============================
  4.  
  5. NOTE. Supplements will henceforth be given the same version number as
  6. the version of Powerbase to which they apply
  7.  
  8. v. 8.00 of Powerbase was released in March 2001. The most recent  manual
  9. (dated May) and text files cover, with minor exceptions, all features
  10. included in version 8.05. The changes and new features introduced since then
  11. have been briefly described in a text file called !Update, included on the
  12. distribution disc, but now seems a suitable time to issue a proper
  13. supplement, which should be read in conjunction with the manual referred to
  14. above.
  15.  
  16. A word needs to be said about the organisation of the supplement. Features
  17. which are completely new, or which somehow escaped mention in the main
  18. manual are described first. Features which are extensions or modifications
  19. to pre-existing ones are described, as far as possible, under the chapter
  20. heading (and section number, where appropriate) of the part of the main
  21. manual to which the new material relates. This may look rather strange but
  22. it means that you can immediately find the place in the manual which should
  23. be consulted alongside the supplement to see how the new features relate to
  24. the old. 
  25.  
  26. Where cross-references occur there is the possibility of confusion; do they
  27. refer to the Manual or the Supplement? To avoid this they are suffixed with
  28. either M or S.
  29.  
  30. Emailing Powerbase Support and accessing our website
  31. ----------------------------------------------------
  32. The iconbar Information window has buttons called Web and Email, in fact
  33. they’ve been there since v.7.76 but have somehow escaped mention until now.
  34. Provided that the filer has “seen” your browser, clicking on the Web button
  35. will load it (if it’s not already loaded) and insert the correct URL for our
  36. website from which you can download the latest version of Powerbase, its
  37. documentation, and a set of sample databases and script files.  Similarly,
  38. if the filer has seen your mail program, clicking on the Email button will
  39. bring up a blank email with the correct email address for Powerbase Support.
  40.  
  41. Saving data about subfile usage and updating
  42. --------------------------------------------
  43. The Information window accessed from the main menu now incorporates a Save
  44. button which opens the standard Save box. The details displayed in the
  45. window can be saved as a text file. By default the file will be saved in
  46. PrintJobs under the name Stats.
  47.  
  48. Giving a database a title screen
  49. --------------------------------
  50. You might like the idea of having your database start up by displaying a
  51. pretty picture and/or some fancy text as an introduction. You can do this by
  52. devising a suitable sprite and saving the sprite file inside the database
  53. directory under the name Title. Only the name of the sprite file is
  54. important; the name of the sprite itself is immaterial and, if the file
  55. contains more than one sprite, the first will be used.
  56.  
  57. When the database is opened the sprite will cover the record window and is
  58. scaled to fit. The aspect ratio of the sprite is maintained, which means
  59. there will usually be strips of grey bordering the sprite, either at the
  60. sides or at top and bottom, since it is most unlikely that the record
  61. window’s aspect ratio will match that of the sprite. If you want to display
  62. text it needs to be part of the sprite. The easiest way  is to design your
  63. title screen in Draw then grab it as a sprite using Paint’s “snapshot”
  64. facility.
  65.  
  66. As soon as you click on a keypad button, or anywhere on the title screen
  67. itself, the sprite vanishes. You can bring it back if you really want to by
  68. clicking ADJUST on the keypad’s Stop button (which is not very intuitive but
  69. such a trivial feature hardly deserves a special button or menu entry to
  70. itself!). If you later decide to dispense with the title screen you should
  71. simply delete the Title file.
  72.  
  73. Preserving your saved options when upgrading
  74. --------------------------------------------
  75. A number of Powerbase’s dialogue boxes give you the opportunity to save your
  76. own choices to be used in place of those initially supplied. The Print
  77. options window, for example, allows you to save the chosen options, not only
  78. in the database currently in use, but in Powerbase itself. The latter choice
  79. makes your own options the defaults which will be used when Powerbase is
  80. subsequently run and will be loaded by clicking on the Load defaults button
  81. on the Print options window. Exactly the same scheme is adopted for
  82. Preferences, CSV options and Field Colours. You may also overwrite the
  83. supplied defaults for keystroke equivalents (from the menu over the keypad)
  84. and for the design grid. You might also want to alter the supplied Config
  85. file.
  86.  
  87. All the files relating to the above (!PrintOpts, Preference, CSVoptions,
  88. FieldCols, Fkeys, GridOpts and Config) are stored in the directory
  89. !Powerbase.Resources. Until now, copying a new version of Powerbase over an
  90. older one would overwrite these files, thus losing your carefully studied
  91. choices, unless you had the knowledge and forethought to make copies first
  92. and then put them back again.
  93.  
  94. In v. 8.20 this source of annoyance has been removed by omitting the seven
  95. files referred to from the Resources subdirectory and placing them instead
  96. in a new subdirectory called Initial. Whenever Powerbase is run, Resources
  97. is examined for each of the files. If present it is left alone but, if
  98. absent, the file is copied from Initial. There is just one problem with this
  99. system. New entries in a file (a new Config setting, for example) will not
  100. be used by the program unless the user deletes the file concerned from
  101. Resources and re-runs Powerbase to force copying of the new file.  To
  102. ameliorate this situation appropriate initial values for any new settings
  103. are provided and the user is warned of any files which contain new settings
  104. on the first occasion the new version is run, and again the first time you
  105. quit the program.
  106.  
  107. Where there is a Load defaults button on a window a click with SELECT loads
  108. the file from Resources as previously, i.e. loads whatever defaults the user
  109. has set up if they have been changed at all. By holding down Shift whilst
  110. clicking with SELECT you can load the new version of the file from Initial.
  111.  
  112. Storage of external fields (including scrollable lists)
  113. -------------------------------------------------------
  114. In all previous versions the top-level subdirectory containing the files
  115. associated with Text, Text block, Sprite, Picture, Draw and Scrollable list
  116. fields was given a name based on the field number. For example, the sample
  117. database Boxes has a Text block as field 9 and the relevant directory is
  118. called Memo9. The Scroller database contains a Text button field whose
  119. directory is also called Memo9 and the Scrollable list (field 20) whose
  120. directory is Scroll20. This system of naming has been changed, field tags
  121. being used instead of field numbers. Under the new system the Text block
  122. directory for Boxes is called Desctext and the two directories for Scroller
  123. are called NOTEtext and TRAXscroll.
  124.  
  125. When an older database is opened using Powerbase 8.20 the relevant
  126. directories are renamed in accordance with this new scheme and a message is
  127. displayed informing the user of this. The only time you need concern
  128. yourself with it is if you need to use such a modified database with an
  129. earlier version of Powerbase. This doesn’t cause an error but all the
  130. affected fields will be blank, even though the associated files are actually
  131. there in the renamed directories. Look inside the database directory and you
  132. will find a !ReadMe file which lists the renamings, and an Obey file called
  133. Revert which can be run in order to restore the old names.
  134.  
  135. 1.3.1 Using the Acorn Help Application
  136. --------------------------------------
  137. Most Powerbase users will know that the program makes extensive use of Help
  138. on windows and menus. To further encourage its use a button from which Help
  139. can be started has been placed on the Information window accessible from the
  140. iconbar menu.  A similar button allows you to do the same thing from the
  141. main menu’s Information window.
  142.  
  143. 2 Browsing and Editing
  144. ----------------------
  145. An alternative to the keypad is now provided in the shape of a tool-pane
  146. attached to the left-hand edge of the record window. To keep the tool-pane
  147. to a reasonable size not all the keypad buttons have been included. No
  148. functionality has been sacrificed, however, because the actions of all the
  149. missing buttons can be produced by clicking on others with ADJUST. There is,
  150. for example, no Previous record button, but clicking ADJUST over the Next
  151. record button has the same effect. To produce a tidy layout some of the
  152. buttons have been changed in size or design. The New record and Search
  153. buttons now carry simply a plus sign and a question mark respectively. Force
  154. update has been shortened to Update and List values changed to Table.
  155.  
  156. When used with many databases (including several of the supplied sample
  157. databases; notably Elements) the tool-pane is so convenient that it has been
  158. made the default setting. However, if you don’t like it you can easily have
  159. the original keypad back with its buttons looking exactly as of old. The
  160. feature is controlled by a new setting in !Powerbase.Resources.Config which
  161. has the token Tools. A parameter of 1 gives the keypad, 2 gives the
  162. tool-pane.
  163.  
  164. 2.3.3 Searching by filter
  165. -------------------------
  166. A button and display icon have been added to the Filter window to display
  167. the number of matches found. Clicking on the Next record button with the
  168. window open and a filter active causes the displayed number to increment
  169. with every match found until the end of the file is reached. Wrap-around
  170. then occurs and the number no longer increases.  Clicking Count displays the
  171. total number of matches in the subfile straight away.
  172.  
  173. 2.5.2 Copying fields
  174. --------------------
  175. In addition to copying within Powerbase using the local clipboard (Ctrl C
  176. and Ctrl V) and copying to and from external applications via the global
  177. clipboard (Ctrl Shift C and Ctrl Shift V) it is now possible to copy
  178. individual fields by dragging with SELECT. If you place the pointer over a
  179. field and press SELECT a text file icon appears under the pointer. You may
  180. drag this to:
  181.  
  182. (a)     another field in the record, provided the latter is an editable field
  183. (b)     a writable icon in any Powerbase dialogue box (e.g. the Query panel)
  184. (c)     an external application which can accept text files such as Edit or
  185.         Impression
  186. (d)     a filer window.
  187.  
  188. The text will be copied to wherever the drag ends. In (a) and (b), if the
  189. data is too long for the icon it will be truncated to fit. In case (c) the
  190. data will be inserted at the caret. (d) saves the text under the name of the
  191. field tag. You might occasionally find it useful to run two copies of
  192. Powerbase, each with a different database (or even each with the same
  193. database!), and drag the contents of fields from one to the other.  See also
  194. 9.2, S.
  195.  
  196. 2.6.4 Editing scrollable lists
  197. ------------------------------
  198. Dates and Times may be entered by means of Ctrl D and Ctrl T respectively,
  199. just like for other fields. Data from validation tables may be entered by
  200. double-clicking on the table (see 5.9, S).
  201.  
  202. 3.1.1 The window destination/3.1.3 The printer destination
  203. ----------------------------------------------------------
  204. Sorting a report in a window can be done in either ascending or descending
  205. order. (This applies also to the Sort-before-printing option; see 3.10, S).
  206. Dates and date-related fields such as day-of-week, month-of-year etc. now
  207. sort chronologically.
  208.  
  209. From v.8.23 Powerbase is able to print in colour both in a window and to a
  210. colour printer. The Print options window contains three new buttons bearing
  211. the letters 'H', 'B' and 'R' to select the foreground colours for the Header
  212. and Body fonts and for vertical and horizontal Rules. The text and border of
  213. these buttons is black by default but clicking on them with SELECT or ADJUST
  214. cycles through the 16 standard desktop colours and causes the fonts and
  215. rules to be printed in the selected colours. Some are, of course, more
  216. useful than others: light grey, cream, yellow and orange are poor but dark
  217. grey, red, blue and green are quite usable for adding enhancement to
  218. reports.
  219.  
  220. 3.5.1 The construction of search formulae (scrollable lists)
  221. ------------------------------------------------------------
  222. In previous versions the facilities for querying Scrollable list fields was
  223. very limited; only the comparators { (“contains”) and }{ (“doesn’t contain”)
  224. were permissible, and they applied to the list in its entirety. It is now
  225. possible to use = and all the other comparators and the test is applied to
  226. each individual cell of the list. You can confine the query to one column of
  227. a list by appending the column number to the field tag following a #
  228. character. e.g. in the supplied example database Scroller, a formula of the
  229. type TRAX#1=<target> would examine the cells in column 1 only, whereas
  230. TRAX=<target> would examine the whole list. 
  231.  
  232. Scrollable list items are always of string, not numeric, type so a numeric
  233. value test such as TRAX#3>15 wouldn’t give the right result. However, the
  234. already-existing trick of forcing numeric comparison by placing the tag in
  235. square brackets as in: [TRAX#3]>15 will work.
  236.  
  237. 3.7.1 Printing records from more than one subfile
  238. -------------------------------------------------
  239. The ability to include in a report records from more than one subfile has
  240. been present for some time. This multiple subfile feature has been extended
  241. to some other operations where the Query panel is involved, namely Global
  242. changes, CSV export and Subset export. The remaining Query panel operations
  243. (Filter and Batch move/delete) still operate on the current subfile only.
  244.  
  245. 3.7.2 Including record number, key and subfile number
  246. -----------------------------------------------------
  247. The Match window has option switches which allow the record number, current
  248. key and subfile number to be included in a report. There used to be no
  249. choice about where these extra items appeared or in what order: the order
  250. was fixed to that stated above and the information appeared in the report at
  251. the beginning of each record. It is now possible to incorporate these items
  252. anywhere in the field order. With the Match window open, highlight fields
  253. for printing by clicking with ADJUST in the usual way and select the option
  254. switches at the required places in the field order. 
  255.  
  256. The field-selection menu, accessed from a menu button on the Match window
  257. and also by Ctrl F (see 3.4, M), shows these extra items for printing in
  258. their correct place in the field order, picking them out in dark blue. If
  259. Extra calculations have been defined (see 6, S) these also appear on the
  260. selection menu in red. In view of the increased importance of this menu it
  261. is now also accessible via a new entry, Display selection, on the Print
  262. submenu.
  263.  
  264. 3.10 The Print options window
  265. -----------------------------
  266. A new icon next to the field for the Sort on field tag or column number
  267. allows you to specify whether the pre-display sort is to be ascending or
  268. descending. It shows a blue arrow which may be clicked to toggle it between
  269. an up and a down arrow.
  270.  
  271. New options have been introduced for the printing of scrollable lists. When
  272. printing in the default single row format items from the same row of the
  273. scrollable list were formerly separated by a single space and the end of
  274. each row marked by a semicolon followed by a space.  Both these markers can
  275. now be chosen by the user by entering them into two writable icons. The
  276. supplied defaults are a comma-plus-space and a semicolon-plus-two-spaces
  277. respectively.  When the alternative columnar format is chosen the end-of-row
  278. marker is irrelevant and is greyed out, but the separator used between items
  279. in the same row may still be chosen. A comma can look ugly in this format
  280. and one or more spaces could be a more suitable choice. (See also 8.3.1, S).
  281.  
  282. 4.2.1 Simple field creation
  283. ---------------------------
  284. The choices for the layout grid can now be saved and will be used next time
  285. you run Powerbase. You can return to the settings initially supplied by
  286. Shift-clicking with SELECT on Load defaults. (see also p.2., S, “Preserving
  287. your saved options when upgrading”)
  288.  
  289. 4.2.5 Other types of editable field
  290. -----------------------------------
  291. Entering an 8-character date (i.e. one with a 2-digit year) into a
  292. 10-character date field (one which displays the year in full) now handles
  293. century wrap-around as follows:
  294.  
  295. (a) Years less than 10 are assumed to be 21st century, e.g. 19-10-02 will be
  296. reformatted as 19-10-2002
  297.  
  298. (b) Other years are assumed to be 20th century, e.g. 19-10-42 will be
  299. reformatted as 19-10-1942
  300.  
  301. The century changeover year can be altered by editing
  302. !Powerbase.Resources.Config. Look for the token CentChange and alter the
  303. associated value (currently 10) to whatever you require. The above rule is
  304. also followed when a database is reformatted so that an 8-character date
  305. becomes a 10-character one (see 10.3, S).
  306.  
  307. 4.2.6  Scrollable lists
  308. -----------------------
  309. Most of the material on p.30 of the manual relating to this section is now
  310. superseded. The definition of these fields has been made much easier. It is
  311. no longer necessary to enter the column width in Data length (in fact this
  312. icon is greyed out when you select Scrollable list as the field type), nor
  313. do you need to create a Format file in a separate operation in order to
  314. specify columns of differing width. An extension at the foot of he
  315. field-definition window allows you to enter the required widths for the
  316. number of columns chosen, and also the number of visible rows. 
  317.  
  318. Moreover, you may change the column widths (and even the number of columns)
  319. without rebuilding the whole database as you would need to do if you wanted
  320. to alter the defined length for other types of field. The Adjust format
  321. utility from the iconbar menu allows you to make such changes with the
  322. minimum amount of bother. Just one word of warning: if you increase the
  323. number of columns in a Scrollable list by this method the data will spread
  324. out over the new columns, i.e. the cells will be used in order. If what you
  325. really want is one or more blank columns to the right of the existing data
  326. then you need New database format, not Adjust format.
  327.  
  328. 4.2.8  External fields
  329. ---------------------
  330. A new option switch, labelled Display, has been added to the
  331. Field-definition window. It is active only for External fields of types
  332. Text, Sprite, Draw and Remote, i.e. those which link external objects to
  333. buttons on the record window.
  334.  
  335. When a record is displayed, any field for which this switch is selected will
  336. behave as though the button had been clicked. You could, for instance, have
  337. a Remote button linking records to a collection of JPEGs and the pictures
  338. would be displayed as you browsed through the database without any further
  339. action on your part. For this to work a suitable JPEG viewer must have been
  340. ‘seen’ by the filer. Most users will have ChangeFSI, recent versions of
  341. which can display JPEGs, but it is rather slow. Thomas Olsson's PD
  342. application EasyView is much faster and ideal for using with Powerbase in
  343. this way. Draw can, from RISC OS 3.7 on, display JPEGs with lightning speed
  344. but is no use for the purpose described above because it doesn't respond to
  345. double-clicks on JPEGs or Filer_Open commands issued by Powerbase for JPEGs.
  346.  
  347. Note: This auto-display feature can also be toggled on and off by clicking Shift-SELECT on the relevant button, irrespective of whether the new option switch is selected. If you wanted the feature to be active when the database was opened you would set the option switch, which would still leave you with the ability to turn auto-display off temporarily using Shift-SELECT. If, on the other hand, you only want to use auto-display occasionally, leave the option switch off and turn the feature on with Shift-SELECT when you require it.
  348.  
  349. Important update on Remote type
  350.  
  351. Previous versions of Powerbase stored the absolute pathnames of objects
  352. linked to Remote buttons. v.8.27 also allows relative pathnames to be used,
  353. i.e. relative to the position of the database in the disc’s directory
  354. structure. Both methods have their advantages and disadvantages and the type
  355. of pathname stored is determined by the entry PathLen in the Config file. This
  356. item formerly specified only the maximum path-length for Remote objects, the
  357. default being 255. The number is now suffixed with either R (for relative) or
  358. A (for absolute), the former being the default. Individual databases can
  359. have their own Config files so it is quite feasible for some databases to use
  360. one type of pathname and some the other.
  361.  
  362. Absolute pathnames are suitable when you are sure the files associated with
  363. the database are going to stay in the same locations as when they were first
  364. attached to the records, but you might want to move the database itself. You
  365. can move the database  to a different disc, or even a different filing system
  366. (on the same machine), and the Remote button will still work. Moving one of
  367. the attached files, however, will make the stored pathname invalid and cause
  368. the button to show a ‘?’ instead of the appropriate file icon.
  369.  
  370. It is envisaged that users will want to use databases with Remote fields to
  371. catalogue data such as collections of photographs in JPEG format and might
  372. at some stage wish to move the whole collection to a zip drive or CD ROM.
  373. The use of relative pathnames makes it possible.
  374.  
  375. An example will make this clearer.  Suppose we have a directory of JPEGs
  376. called Pictures, each of which is associated via a Remote button with a
  377. record in a database called !MyPhotos. The arrangement on the hard disc
  378. might be as in the diagram below.
  379.  
  380.               [LOAD THE DRAWFILE 'DiscTree' FOR DIAGRAM]
  381.  
  382. The full pathname of the JPEG Horse is:
  383.  
  384.           ADFS::HardDisc4.$.FredsData.Pictures.Animals.Horse
  385.  
  386. which is what previous versions of Powerbase would have stored. The pathname
  387. of the database is:
  388.  
  389.             ADFS::HardDisc4.$.FredsData.Databases.!MyPhotos
  390.  
  391. The first sections of both pathnames, as far as and including FredsData, are
  392. identical and this enables us to locate Horse without using its full
  393. pathname. Powerbase does, of course, know the full pathname for !MyPhotos
  394. when the database is open so it can find Horse by, in effect, saying: “Go up
  395. two levels in the disc tree from the database, then use the pathname
  396. Pictures.Animals.Horse ”.
  397.  
  398. But how do we let Powerbase know it needs to go up two levels? The character
  399. ‘^’, included as an element in a pathname, is an instruction to go up one
  400. level. What needs to be stored for the example given above therefore is:
  401.  
  402.                       ^.^.Pictures.Animals.Horse
  403.  
  404. which is the pathname relative to !MyPhotos. When Powerbase reads this all
  405. it needs to do is prefix it with the already-known pathname for !MyPhotos and
  406. the JPEG Horse can be retrieved.  If the directories Databases (containing
  407. !MyPhotos) and Pictures (containing the subdirectory Animals) were
  408. transferred to the root directory of a CD ROM the pathnames of Horse  and
  409. !MyPhotos might change to something like:
  410.  
  411.                 CDFS::PICLIB.$.Pictures.Animals.Horse 
  412. and:            CDFS::PICLIB.$.Databases.!MyPhotos
  413.  
  414. If !MyPhotos contained the (old) absolute pathname for Horse, Powerbase
  415. would be unable to find the file, but the relative pathname is still valid:
  416. it’s still a matter of going up two directories (thus reaching the root) and
  417. then working down from there.
  418.  
  419. You can highlight a Remote button with ADJUST as part of a print selection in order to print the stored pathnames of the Remote objects. An individual pathname may be displayed by clicking with Shift-ADJUST.
  420.  
  421. Attention is also drawn to the fact that objects attached to Run file and
  422. Directory buttons on the record window have their pathnames determined in
  423. the same way as for Remote objects. (See below.)
  424.  
  425. 4.2.11 Button fields
  426. -------------------- 
  427. Run file and Directory
  428.  
  429. To avoid problems with objects linked to Run file and Directory buttons when
  430. a database is moved to a different disc, filing system or computer, make sure
  431. that the linked files are referenced by relative rather than absolute
  432. pathnames. (See 4.2.8 S, above.) If you are using such button fields you are
  433. recommended to re-link the object to the button.
  434.  
  435. It must be said, however, that the best policy of all is to put files which
  436. are of significance to one database only into the database’s PrintRes
  437. directory. Only the leafname of the file is stored in this case and, on
  438. finding only a leafname, Powerbase looks for the file in PrintRes.
  439.  
  440. Menu
  441.  
  442. The link between a pop-up menu button and the field into which the menu
  443. enters data was formerly established by using the field-number of the data
  444. field as the tag of the menu button. This has now been changed so that the
  445. actual tag of the relevant data field is used instead of the field-number.
  446. i.e. the data field and the menu button have the same tag − the only
  447. circumstance in which this is permitted (apart from label text which has a
  448. null tag).  If you do enter the field-number you will find on returning to
  449. the field definition that the tag has been substituted. User menus on older
  450. databases which actually do use the field-number as the button tag will
  451. still work correctly.
  452.  
  453. The procedure for creating and editing the text file for a user menu has
  454. also been improved. When the menu button is clicked with SELECT or MENU for
  455. the first time the default text file is displayed in an editor and contains
  456. instructions for tailoring it to your requirements. You then save the file
  457. under the same name and subsequent clicks on the menu button open the menu.
  458. Should you need to edit the menu file again later you can call it up by
  459. clicking the menu button with ADJUST. These changes make it unnecessary for
  460. users to delve into the Menus directory inside the database.
  461.  
  462. By default user menus pop up whenever the caret enters the associated data
  463. field. This action can be turned off via a new switch on the Preferences
  464. window.
  465.  
  466. 5.5 Displaying validation tables
  467. --------------------------------
  468. Double-clicking a linked data field to bring up the relevant validation
  469. table entry now works for Scrollable list fields, as does the automatic
  470. display of linked data when the Display linked table data switch on the
  471. Preferences window is selected.
  472.  
  473. 5.9 Entering validation table data into a record
  474. ------------------------------------------------
  475. The ability to enter data into a field by double-clicking with SELECT on an
  476. item in a validation table has now been extended. You can enter data into
  477. Scrollable list fields in this way. Moreover, the caret moves automatically
  478. to the next cell on the assumption that you are probably entering several
  479. items from the table into the list. On reaching the last cell, holding down
  480. Shift as you double-click will add a new row to the list, making this form
  481. of input consistent with direct typing into the list.
  482.  
  483. Two further improvements have been made to the use of validation tables with
  484. Scrollable list fields. Coded data will be expanded in reports if the Expand
  485. codes switch is selected in Print options, and the Replace-on-entry feature
  486. also works, provided the replacement string will fit the cell of the
  487. Scrollable list.
  488.  
  489. It is also possible to enter data from a validation table into other
  490. writable icons on Powerbase dialogue boxes using this method. It could be
  491. especially useful as an aid to entering search formulae. 
  492.  
  493. 6 Performing calculations
  494. -------------------------
  495. Computed fields, containing the results of calculations and string
  496. operations on other fields (and also the results of User Functions) have
  497. been present in Powerbase for a long time now. They do, however, have the
  498. disadvantage of requiring the user either to foresee at the time the
  499. database is designed what calculations will be required or reformat later in
  500. order to include a field which might only be needed for a one-off inclusion
  501. in a report.
  502.  
  503. v. 8.20 lets you specify such calculations without the need for a field to
  504. which to attach them. In a sense they resemble the existing column
  505. calculations for mean, standard deviation etc. in that they are performed on
  506. the fly during the creation of a report.
  507.  
  508. To define a calculation choose the new entry Extra calculations (Ctrl Shift
  509. N) from the Print submenu. The window which appears requires you to enter a
  510. formula, which has exactly the same format as the formulae attached to
  511. Calculated and Composite fields (see 6.1 and 6.2, M). Since the calculation
  512. will not be attached to a field from which to derive a heading, a width and
  513. whether the result is to be numeric or not, you must supply this data
  514. yourself.  If you omit anything Powerbase will use the formula itself as a
  515. heading, assume a Numeric result and assign a width of 15 characters (the
  516. maximum space a number can occupy). If you have clicked the radio button to
  517. select a String (i.e. non-numeric) result such as would be placed in a
  518. Composite field, the width will default to 255 characters. This might seem
  519. an enormous value, but unnecessary “white space” will be removed from the
  520. report before printing if the output is to the printer. If the report is to
  521. be displayed in a window the Shrink list button on the Print options window
  522. should be selected. Failing this you may remove the surplus space by
  523. choosing Shrink list from the menu over the report window.
  524.  
  525. It is possible to produce errors by unsuitable combinations of fields and
  526. result types (just as it is for Computed fields). The main thing to remember
  527. is that Numeric fields will normally produce a numeric result so assigning a
  528. String operation to such fields can be expected to produce an error. There
  529. are exceptions even to this rule since the Basic STR$() function may be used
  530. to convert a number to a string, thus allowing Numeric fields to give a
  531. String result. Dates, Times and User Functions may be used in Extra
  532. calculations, just as they can in Computed fields.
  533.  
  534. When you have defined your calculation, click on Include. The displayed
  535. calculation number will go from 0 to 1 and the window is set up for entry of
  536. another calculation. A total of 10 (numbered 0-9) are allowed and you may
  537. return to earlier calculations to edit them by clicking the “bump” icons.
  538.  
  539. The position of such calculated results in the report is determined by the
  540. point at which you define them. If you click ADJUST to highlight a field,
  541. then type Ctrl Shift N to bring up the new window and define a calculation,
  542. and finally highlight another field, the calculated result will appear
  543. between the highlighted fields. The menu of selected fields (see 3.7.2, S)
  544. shows these calculations in red so you can easily check on the order in
  545. which things will appear on the report. You can choose the red entries from
  546. this menu to bring up the calculation window for editing. 
  547.  
  548. All defined calculations are saved as part of a Print Selection and will be
  549. restored when the Selection file is subsequently reloaded. The Clear button
  550. on the calculation window has the same effect as Clear selection (Ctrl Z)
  551. from the Print submenu.
  552.  
  553. 6.3 User functions
  554. ------------------
  555. The management of User functions has been improved. Previous versions of Powerbase kept all user functions in a single Basic file called UserFuncs, which was placed directly inside the database directory and loaded as a library when the database was opened. This could be somewhat inconvenient. If the user wanted to use a function from the supplied UserFuncs file s/he could either place the entire file inside the database, leading to a waste of memory, or extract the required function and save it separately in the database directory as UserFuncs.
  556.  
  557. From v.8.24 UserFuncs is a directory and each function is saved in it as a separate Basic program file which may be called anything the user wishes. When the database is opened all such files, whether there’s one or a dozen, are loaded. Individual databases therefore need only store the User functions they actually use and copying individual functions from one database to another is easy.
  558.  
  559. If, on opening a database, it is found to contain an old-style UserFuncs file, as opposed to a directory, the missing directory is created and the file transferred to it. It will not, however, be split into separate functions.
  560.  
  561. 7.2 Indexing a field
  562. --------------------
  563. All dates and date-related fields such as day-of-week, month-of-year now
  564. index chronologically.
  565.  
  566. 8.3 Exporting data as a CSV file
  567. --------------------------------
  568. CSV export has been harmonised with printing in two ways. If there is a
  569. default print selection file (i.e. one called !Selection in PrintRes) it
  570. will be used to determine what fields are exported provided no alternative
  571. selection has been highlighted. If you hold down Shift when initiating a CSV
  572. export operation only the currently-displayed record will be exported.
  573.  
  574. 8.3.1 Scrollable lists and CSV files
  575. ------------------------------------
  576. When you include a scrollable list as one of the fields in a CSV file it
  577. will be written as a single CSV field if the single row format is selected
  578. in the Print options window. The data from individual rows of the list was
  579. formerly separated by a semicolon but this is now configurable by a new
  580. choice Scroll term in the CSV options window underneath the Separator and
  581. Terminator for CSV fields. The default for Scroll term is still a semicolon.
  582. The data from individual cells in the same row of the scrollable list are
  583. separated by the same CSV separator as is used between CSV fields.
  584.  
  585. The above description might seem confusing but will become clearer if you
  586. export data from the sample database Scroller using the default settings but
  587. with In quotes selected in CSV options. You will see that the entire
  588. scrollable list from each record is enclosed in double quotes, between which
  589. the items from within each row are separated by commas, a semicolon marking
  590. the end of each row.  
  591.  
  592. A file exported in this way can be re-imported into a Powerbase database.
  593. You must ensure that the scrollable list data goes back into a scrollable
  594. list field, although it need not have the same number of columns as the one
  595. from which it was exported. If the new list has more columns than the old
  596. there will be one or more blank columns on the right hand side; if there are
  597. fewer columns data from the missing columns will be discarded. This handling
  598. of data underflow and data overflow is the same as what happens when there
  599. are more or fewer fields in the the database than in the one from which the
  600. file was exported (see 8.4.2, M).
  601.  
  602. If you change the CSV printing format in Print options from As single row to
  603. As columns and export the CSV file again (in quotes as before) you will see
  604. the contents of each row enclosed in double quotes and separated by commas,
  605. the items from within each row being also separated by commas.
  606.  
  607. Exporting this second file without the quotes (or the first file if you
  608. first change Scroll term to a comma) will result in a file in which every
  609. single cell of the scrollable list appears as a separate CSV field,
  610. separated from the next by a comma. This might prove useful if transferring
  611. data from a database which contains a scrollable list to one which doesn’t.
  612.  
  613. 8.6 Creating a new, working database from a CSV file
  614. ----------------------------------------------------
  615. The facility has been much improved, but this involves changes to the header
  616. format described in the manual. Instead of the sequence: 
  617.  
  618. maximum length                                  field-type number
  619. tag                        it now uses:         maximum length
  620. field-type number                               descriptor
  621.                                                 tag
  622.  
  623. The separator between these pieces of information is the vertical bar (|)
  624. rather than the international currency symbol (¤). Neither is very likely to
  625. occur as a normal character in a CSV file but the former has a dedicated key
  626. on all keyboards whereas the latter, although it appeared on A3000 and other
  627. early Acorn keyboards, does not.  The CSV separator is, of course, used
  628. between the groups of items relating to each field so, assuming this to be a
  629. comma, we have:
  630.  
  631.         <type>|<length>|<desc>|<tag>,<type>|<length>|<desc>|<tag>,...
  632.  
  633. You may omit the field-type and either the descriptor or tag, but not both.
  634. This gives a minimum specification for each field of:
  635.  
  636.                           <number>|<string>
  637.  
  638. The number will be interpreted as data length and the the omitted field-type
  639. assumed to be 0, i.e. Unrestricted. This makes it possible to use this
  640. facility without knowing the field-type numbers (they can be found in
  641. !Powerbase.Resources.ValStrings) but with no control imposed on any
  642. subsequent input. The supplied string will be used for both descriptor and
  643. tag, as in the older format. You can force a null descriptor (but not a null
  644. tag) by putting two bar characters together:    
  645.  
  646.                          <number>||<string>
  647.  
  648. 9.2 Mail-merging with Impression and OvationPro
  649. -----------------------------------------------
  650. Yes! At long last Powerbase can mail-merge with OvationPro using the same
  651. method as for Impression, i.e. using the ImpulseII module supplied with
  652. Powerbase. When using Powerbase with OvationPro you can if you wish alter
  653. the Impulse client field in the Preferences window to read “OvationPro”
  654. instead of “Impression”, but this isn’t really necessary because Powerbase
  655. knows which you are using from the filetype of the document dropped on the
  656. record window.
  657.  
  658. Preparing an OvationPro  document for Impulse-type merging is a slightly
  659. more complicated process than for an Impression document and you are
  660. strongly recommended to use the new, user-friendly method described below,
  661. which is applicable to both. If you are using Impression there are no extra
  662. preliminaries, but to use this method with OvationPro you first need to do
  663. the following:
  664.  
  665. •   Open the Applets subdirectory inside OvationPro and copy the
  666.     !Impulse applet into it. If your OvationPro is a recent version,
  667.     supplied on CD, you will find this applet in the DavidPilling.Applets
  668.     directory.  
  669.  
  670. •   The filer also needs to have “seen” the !TransDDF filter which is in the
  671.     directory DavidPilling.Filters on the CD. The !Boot and !Run files of
  672.     this filter need to be modified to load ASCII DDF files as described in
  673.     the !Help file.
  674.  
  675. Inserting the merge commands
  676. ----------------------------
  677. The procedure for preparing the Impression document has been made much more
  678. user-friendly. Formerly it was necessary to insert the merge commands into
  679. the document manually but this can now be done by dragging and dropping from
  680. Powerbase itself. If all that is required is to insert the contents of a
  681. field the procedure is:
  682.  
  683. •       Place the caret in the Impression document where you want to insert
  684.         the command.
  685. •       Point at the required Powerbase field, hold down SELECT and
  686.         Shift/drag the field to the document. (Dragging without Shift
  687.         inserts the field contents. See 2.5.2, S.)
  688.  
  689. This inserts an Impulse GetField command which will appear at the caret.
  690. There are, however, other Impulse commands which you might want to insert,
  691. e.g. GetExpanded which may be used for fields which are linked to validation
  692. tables. Instead of inserting the actual field contents, GetExpanded will
  693. insert the “expanded” item from the second column of the validation table.
  694. (See 5.8, M). Also very useful is the NextMatch command which allows you to
  695. continue inserting from the next matching record into the same copy of the
  696. document instead of producing a fresh document for each record.
  697.  
  698. All three of the commands described may inserted by choosing the new entry
  699. Merge commands from the iconbar Utilities submenu. The procedure for this
  700. method is:
  701.  
  702. •       Display the tag of the relevant field using either the “bump” icons
  703.         or pop-up menu
  704. •       Choose the required command from the lower pop-up menu. (For
  705.         NextMatch the field displayed is unimportant.) If GetExpanded is to
  706.         be used the expanded string is taken, by default, from column 1 of
  707.         the validation table. You can if you wish expand from a different
  708.         column by entering the column number in the writable menu item
  709.         attached to the GetExpanded choice. Remember that columns are
  710.         numbered from 0. 
  711. •       Place the caret in the required place in the Impression document. 
  712. •       Drag the text-file icon onto the document (without Shift this time).
  713.  
  714. 10.2/10.3 Adjusting/Changing the record format
  715. ----------------------------------------------
  716. All the objects which can appear on the record screen are regarded as fields
  717. and have a field-number and field-type, even though many of them don’t
  718. actually hold any data. The control buttons which duplicate those on the
  719. tool-pane or keypad are an obvious example. When you define such fields the
  720. Data length icon on the Field design window is greyed out because Powerbase
  721. assigns zero to them without your needing to do anything. However, each of
  722. the fields, zero length notwithstanding, used to occupy one byte (a newline
  723. character) in every record of the Database file.  In v.8.21 and later this
  724. is no longer the case: button fields occupy no file space. This means that
  725. the Database file might be smaller—perhaps quite a lot smaller if there are
  726. many on-screen buttons and the database is large.
  727.  
  728. There is, though, another far greater advantage. Because such fields no
  729. longer affect the record length it is possible to add them to a functioning
  730. database without rebuilding it. Previously, the only changes you could make
  731. without rebuilding were minor ones such as renaming and moving fields or
  732. changing an alphanumeric to a numeric field. You can now do much more.
  733.  
  734. I can imagine some users saying “So what? I never put control buttons on my
  735. database screens”.  Well, the change affects other things besides buttons.
  736. The complete list of zero-length fields is:
  737.  
  738. •       All keypad-type buttons
  739. •       All additional buttons, including those which open directories or
  740.         run files
  741. •       Textual labels. i.e. Fields which consist of a descriptor only
  742. •       All External field-types except Remote.
  743. •       Logos
  744. •       Scrollable lists
  745.  
  746. Some of these might surprise you. Weren’t we talking about fields with no
  747. associated data? Not necessarily; we’re talking about fields which don’t
  748. place any data in the Database file. External fields do have data associated
  749. with them but it’s stored in separate, discrete files, one for each record.
  750. Remote fields are an exception because they store a pathname to a
  751. file/directory/application somewhere on the system and the pathnames are
  752. kept in Database. Scrollable lists are really a special type of External
  753. field because they too involve a separate file associated with each record. 
  754. It’s worth saying again: all the field-types listed above can be added to an
  755. existing database simply by means of what was formerly called the Adjust
  756. format utility provided the Database file has the new format.
  757.  
  758. Reflecting this important change the utility referred to above appears on
  759. the menu as Alter format if the new format is detected and the New record
  760. format utility appears as Rebuild database.
  761.  
  762. How do older databases fare under the new arrangement? If any of the above
  763. field-types are present they will occupy a byte each in every record and
  764. Powerbase needs to be able to distinguish an old-style Database file from a
  765. new one. To achieve this the file in a newly-created database is given the
  766. filetype &fff (Text) instead of &7f2. (The latter is now used only for the
  767. Form file in new databases and is adorned with an ‘F’ instead of a ‘D’.) If,
  768. when a database is opened, the Database file is found to be of type &fff the
  769. Alter format utility will allow you to create fields of the types listed
  770. above. If the filetype is &7f2 the facilities available will have the old
  771. names on the Utilities menu and are limited to the minor adjustments of
  772. previous versions.
  773.  
  774. Adding extra Editable fields, Check-boxes, Computed fields and Stamp fields
  775. (except Logo) still necessitates rebuilding the database, the procedure for
  776. which is unchanged. The Database file is, of course, rebuilt according to
  777. the new structure and given type &fff. The easiest way to update your
  778. database to the new format is therefore to invoke New record format without
  779. making any changes when offered the design screen.
  780.  
  781. Although databases created with older versions of Powerbase work fine under
  782. v.8.21 the reverse may not be true. Do take care not to run a newly-created
  783. database with an older Powerbase. No harm should result if the database
  784. contains none of the affected field-types but if any are present the
  785. database is likely to be corrupted.
  786.  
  787. Reformatting a database containing an 8-character date (2-digit year) so
  788. that the field becomes a 10-character date (4-digit year) now makes the
  789. change without assuming 21st century for all values. The rule followed is
  790. the same as that for reformatting a “short” date entered into a field
  791. intended for a “long” one (see 4.2.5, S). Reformatting a 10-character date
  792. to an 8-character one now works correctly. 
  793.  
  794. 10.6 Inspecting and balancing index trees
  795. -----------------------------------------
  796. Balancing can be invoked with Ctrl B. When complete, the totals in each tree
  797. level are displayed. If Ctrl Shift B is used the full tree structure is
  798. displayed. Formatting of the latter has been improved, keys in different
  799. levels being spaced taking account of the key length so that no overlapping
  800. occurs. There is now a choice on the Print index submenu between the
  801. previous unsymmetrical format in which the root is printed first, and a more
  802. symmetrical one.
  803.  
  804. 12 Script files
  805. ---------------
  806. The !QUERY command can, like !SELECTION and !PRINTOPTS, now accept a
  807. filename, which must, of course, be that of a valid saved Query file. (See
  808. !SCRIPT in 12, M for rules relating to filenames.)
  809.  
  810. When requesting user-input for the !FORMAT command only the initial letter
  811. H, V, T or L is required. If an attempt is made to execute a !QUERY with the
  812. format set to Table or Label and the output destination not set to Printer
  813. an error message is printed. (This is the only way you can attempt to do
  814. such a thing: access to the Printer set-up window is barred until you select
  815. Printer.)
  816.  
  817. 14.4.3 Preferences − Options switches
  818. -------------------------------------
  819. A new option switch has been added which causes Powerbase to “remember”
  820. which records, if any, are marked and restore the marks when the database is
  821. next opened. The type of marking (Include or Exclude) is also saved. 
  822.  
  823. An option which determines whether or not user menus open automatically when
  824. the caret enters the associated data field has already been mentioned
  825. (4.2.11, S).
  826.  
  827. Save edits as CSV file
  828. ---------------------
  829. Prior to v.8.25 the file saved in PrintJobs was simply called NewData. The
  830. data saved from a previous editing session would be overwritten the next
  831. time the database was opened (assuming the option switch was set). The
  832. position has now been improved by adding an incrementing number to the
  833. filename so that files are saved successively as NewData01, NewData02 etc.